package com.beijing.demo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

public class HelloController implements Controller {

	@Override
	public ModelAndView handleRequest(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		System.out.println("======HelloController==========");

		ModelAndView model = new ModelAndView();
		model.addObject("message", " world!!!! hello");
		model.setViewName("demo/hello");
		return model;
	}

}
